package io.bdmc.modules.bss.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.bdmc.common.utils.MyPage;
import io.bdmc.modules.bss.entity.DeviceRouteAlarmSetting;
import io.bdmc.modules.bss.mapper.DeviceRouteAlarmSettingMapper;
import io.bdmc.modules.bss.service.IDeviceRouteAlarmSettingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 黄露
 * @since 2021-06-09
 */
@Service
public class DeviceRouteAlarmSettingServiceImpl extends ServiceImpl<DeviceRouteAlarmSettingMapper, DeviceRouteAlarmSetting> implements IDeviceRouteAlarmSettingService {
    @Autowired
    DeviceRouteAlarmSettingMapper _deviceroutealarmsettingMapper;

    @Override
    public MyPage<DeviceRouteAlarmSetting> mySelectPage(MyPage<DeviceRouteAlarmSetting> myPage) {
        return _deviceroutealarmsettingMapper.mySelectPage(myPage);
    }

    @Override
    public List<DeviceRouteAlarmSetting> selectByRouteId(Integer routeId) {
        QueryWrapper<DeviceRouteAlarmSetting> w1 = new QueryWrapper<>();
        w1.eq("route_id",routeId);
        return list(w1);
    }
}
